<?php if(!defined('CALL')) exit('No direct script access allowed');

include_once('lib/xtemplate.class.php');

class vLetters
{
	public static function registration($email, $hash)
	{
		$xtpl = new XTemplate('xtpl/letters.xtpl');
		$xtpl->assign('root', ROOT_URL);
		$xtpl->assign('email', $email);
		$xtpl->assign('hash', $hash);
		$xtpl->assign('ip', $_SERVER['REMOTE_ADDR']);
		$xtpl->parse('root.reg');
		return $xtpl->text('root.reg');
	}
	
	public static function lost($email, $hash)
	{
		$xtpl = new XTemplate('xtpl/letters.xtpl');
		$xtpl->assign('root', ROOT_URL);
		$xtpl->assign('email', $email);
		$xtpl->assign('hash', $hash);
		$xtpl->assign('ip', $_SERVER['REMOTE_ADDR']);
		$xtpl->parse('root.lost');
		return $xtpl->text('root.lost');
	}
}